package com.mezz.bones.im.logic.controller;

import com.mezz.bones.framework.base.domain.response.Result;
import com.mezz.bones.im.logic.domain.request.ApiGroupInfoCreateRequest;
import com.mezz.bones.im.logic.service.IChatGroupInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("IM群组信息管理")
@RequestMapping("/im/group/info")
@RestController
@AllArgsConstructor
public class ChatGroupInfoController {

    private final IChatGroupInfoService groupInfoService;


    @PostMapping("/create")
    @ApiOperation("创建群组")
    public Result<String> create(@RequestBody ApiGroupInfoCreateRequest request){

        groupInfoService.createGroupInfo(request);
        return Result.OK();
    }
}
